ANSIエスケープシーケンス 仕組み
読み解き https://en.wikipedia.org/wiki/ANSI_escape_code
PythonとANSIエスケープシーケンスでESCで始まることを確認した
0x1B Starts all the escape sequences
ESC[<color>m<text>という形式になっている
colorはnumber
たしかに、通常の文字列では表せない感
CSI: ESC[
For Control Sequence Introducer, or CSI, commands, the ESC [ is followed by any number (including none) of "parameter bytes" in the range 0x30–0x3F (ASCII 0–9:;<=>?)
https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_(Control_Sequence_Introducer)_sequences
SGR: CSI<num>m
https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters
num=0はreset
30–37 Set foreground color
40–47 Set background color